#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>
#include <assert.h>

//void my_strcpy(char* dest, char* src)
//{
//	while (*src != '\0')
//	{
//		*dest = *src;
//		dest++;
//		src++;
//	}
//	*dest = *src;
//}

char* my_strcpy(char* dest, const char* src)
{
	char* ret = dest;
	assert(dest);
	assert(src);
	while (*dest++ = *src++);
	return ret;
}

int main()
{
	char arr1[] = "abcdef"; 
	char arr2[30] = { 0 };
	
	char* ret = my_strcpy(arr2, arr1);
	printf("%s\n", ret);
	return 0;
}
